﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using NHibernate;
using NHibernate.Linq;
using NhJump.Persistence.Context;
using NhJump.Persistence.Model;

namespace NhJump.Persistence.Querying.Executable
{
    public class LinqQuery<T, TIdentifier> : CriteriaQuery<T, TIdentifier>
        where T : IDomainEntity<TIdentifier>
    {
        public LinqQuery(IQueryable<T> query, IUnitOfWork unitOfWork)
        : base((ICriteria)((NHibernateQueryProvider)query).TranslateExpression(query.Expression), unitOfWork)
        {
        }
    }
}
